home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 February: Technology Seed / Mac Tech Seed Feb '97.toast / OpenDoc 1.2b2c1 / OpenDoc / Interfaces / IDL / Part.idl < prev    next >
Encoding:
Text File  |  1997-02-13  |  9.8 KB  |  352 lines  |  [TEXT/MPS ]

  1. //#    Copyright:    © 1993 - 1995 by Apple Computer, Inc., all rights reserved.
  2.  
  3. #ifndef _PART_
  4. #define _PART_
  5.  
  6. #ifndef _PSTOBJ_
  7. #include "PstObj.idl"
  8. #endif
  9.  
  10. //==============================================================================
  11. // Classes defined in this interface
  12. //==============================================================================
  13.  
  14. interface ODPart;
  15.  
  16. //==============================================================================
  17. // Classes used by this interface
  18. //==============================================================================
  19.  
  20. interface ODCanvas;
  21. interface ODDragItemIterator;
  22. interface ODEmbeddedFramesIterator;
  23. interface ODFacet;
  24. interface ODFrame;
  25. interface ODLink;
  26. interface ODLinkSource;
  27. interface ODObjectSpec;
  28. interface ODShape;
  29. interface ODStorageUnit;
  30. interface ODStorageUnitView;
  31. interface ODTypeList;
  32.  
  33. //==============================================================================
  34. // ODPart
  35. //==============================================================================
  36.  
  37. interface ODPart : ODPersistentObject
  38. {
  39.  
  40.     //==========================================================================
  41.     // Required Protocols
  42.     //==========================================================================
  43.  
  44.     //--------------------------------------------------------------------------
  45.     // Initialization
  46.     //--------------------------------------------------------------------------
  47.  
  48.     void InitPart(in ODStorageUnit storageUnit,
  49.                   in ODPart partWrapper);
  50.  
  51.     void InitPartFromStorage(in ODStorageUnit storageUnit,
  52.                              in ODPart partWrapper);
  53.  
  54.     //--------------------------------------------------------------------------
  55.     // From Layout protocol
  56.     //--------------------------------------------------------------------------
  57.  
  58.     void DisplayFrameAdded(in ODFrame frame);
  59.  
  60.     void DisplayFrameRemoved(in ODFrame frame);
  61.  
  62.     void DisplayFrameConnected(in ODFrame frame);
  63.  
  64.     void DisplayFrameClosed(in ODFrame frame);
  65.  
  66.     void AttachSourceFrame(in ODFrame frame,
  67.                            in ODFrame sourceFrame);
  68.  
  69.     void FrameShapeChanged(in ODFrame frame);
  70.  
  71.     void ViewTypeChanged(in ODFrame frame);
  72.  
  73.     void PresentationChanged(in ODFrame frame);
  74.  
  75.     void SequenceChanged(in ODFrame frame);
  76.  
  77.     void LinkStatusChanged(in ODFrame frame);
  78.  
  79.     void ContainingPartPropertiesUpdated(in ODFrame frame,
  80.                                          in ODStorageUnit propertyUnit);
  81.  
  82.     ODInfoType ReadPartInfo(in ODFrame frame,
  83.                             in ODStorageUnitView storageUnitView);
  84.  
  85.     void WritePartInfo(in ODInfoType partInfo,
  86.                        in ODStorageUnitView storageUnitView);
  87.  
  88.     void ClonePartInfo(in ODDraftKey key,
  89.                        in ODInfoType partInfo,
  90.                        in ODStorageUnitView storageUnitView,
  91.                        in ODFrame scope);
  92.  
  93.     ODID Open(in ODFrame frame);
  94.  
  95.     //--------------------------------------------------------------------------
  96.     // From Imaging protocol
  97.     //--------------------------------------------------------------------------
  98.  
  99.     void Draw(in ODFacet facet,
  100.               in ODShape invalidShape);
  101.  
  102.     void FacetAdded(in ODFacet facet);
  103.  
  104.     void FacetRemoved(in ODFacet facet);
  105.  
  106.     void GeometryChanged(in ODFacet facet,
  107.                          in ODBoolean clipShapeChanged,
  108.                          in ODBoolean externalTransformChanged);
  109.  
  110.     void HighlightChanged(in ODFacet facet);
  111.  
  112.     void CanvasChanged(in ODFacet facet);
  113.  
  114.     void CanvasUpdated(in ODCanvas canvas);
  115.  
  116.     ODULong GetPrintResolution(in ODFrame frame);
  117.  
  118.     //--------------------------------------------------------------------------
  119.     // From Part Activation protocol
  120.     //--------------------------------------------------------------------------
  121.  
  122.     ODBoolean BeginRelinquishFocus(in ODTypeToken focus,
  123.                                    in ODFrame ownerFrame,
  124.                                    in ODFrame proposedFrame);
  125.  
  126.     void CommitRelinquishFocus(in ODTypeToken focus,
  127.                                in ODFrame ownerFrame,
  128.                                in ODFrame proposedFrame);
  129.               
  130.     void AbortRelinquishFocus(in ODTypeToken focus,
  131.                               in ODFrame ownerFrame,
  132.                               in ODFrame proposedFrame);
  133.                   
  134.     void FocusAcquired(in ODTypeToken focus,
  135.                        in ODFrame ownerFrame);
  136.   
  137.     void FocusLost(in ODTypeToken focus,
  138.                    in ODFrame ownerFrame);
  139.                   
  140.  
  141.     //--------------------------------------------------------------------------
  142.     // From Part Persistance protocol
  143.     //--------------------------------------------------------------------------
  144.  
  145.     void ExternalizeKinds(in ODTypeList kindset);
  146.  
  147.     void ChangeKind(in ODType kind);
  148.  
  149.     //--------------------------------------------------------------------------
  150.     // From UI Events protocol
  151.     //--------------------------------------------------------------------------
  152.  
  153.     ODBoolean HandleEvent(inout ODEventData event,
  154.                           in ODFrame frame,
  155.                           in ODFacet facet,
  156.                           inout ODEventInfo eventInfo);
  157.   
  158.     void AdjustMenus(in ODFrame frame);
  159.     
  160.     //==========================================================================
  161.     // Optional Protocols
  162.     //==========================================================================
  163.  
  164.     //--------------------------------------------------------------------------
  165.     // From Undo protocol
  166.     //--------------------------------------------------------------------------
  167.  
  168.     void UndoAction(in ODActionData actionState);
  169.  
  170.     void RedoAction(in ODActionData actionState);
  171.  
  172.     void DisposeActionState(in ODActionData actionState,
  173.                             in ODDoneState doneState);
  174.  
  175.     void WriteActionState(in ODActionData actionState,
  176.                           in ODStorageUnitView storageUnitView);
  177.  
  178.     ODActionData ReadActionState(in ODStorageUnitView storageUnitView);
  179.  
  180.     //--------------------------------------------------------------------------
  181.     // From DragAndDrop protocol
  182.     //--------------------------------------------------------------------------
  183.  
  184.     void FulfillPromise(in ODStorageUnitView promiseSUView);
  185.  
  186.     void DropCompleted(in ODPart destPart,
  187.                        in ODDropResult dropResult);
  188.  
  189.     ODDragResult DragEnter(in ODDragItemIterator dragInfo,
  190.                            in ODFacet facet,
  191.                            in ODPoint where);
  192.  
  193.     ODDragResult DragWithin(in ODDragItemIterator dragInfo,
  194.                             in ODFacet facet,
  195.                             in ODPoint where);
  196.  
  197.     void DragLeave(in ODFacet facet,
  198.                    in ODPoint where);
  199.  
  200.     ODDropResult Drop(in ODDragItemIterator dropInfo,
  201.                       in ODFacet facet,
  202.                       in ODPoint where);
  203.  
  204.     //--------------------------------------------------------------------------
  205.     // From Linking protocol
  206.     //--------------------------------------------------------------------------
  207.  
  208.     ODLinkSource CreateLink(in ODByteArray data);
  209.  
  210.     void RevealLink(in ODLinkSource linkSource);
  211.  
  212.     void LinkUpdated(in ODLink updatedLink,
  213.                      in ODUpdateID change);
  214.  
  215.     // --- for containing parts ---
  216.  
  217.     void EmbeddedFrameUpdated(in ODFrame frame,
  218.                               in ODUpdateID change);
  219.  
  220.     ODBoolean EditInLinkAttempted(in ODFrame frame);
  221.  
  222.     //--------------------------------------------------------------------------
  223.     // From Embedding protocol
  224.     //--------------------------------------------------------------------------
  225.  
  226.     ODFrame RequestEmbeddedFrame(in ODFrame containingFrame,
  227.                                  in ODFrame baseFrame,
  228.                                  in ODShape frameShape,
  229.                                  in ODPart embedPart,
  230.                                  in ODTypeToken viewType,
  231.                                  in ODTypeToken presentation,
  232.                                  in ODBoolean isOverlaid);
  233.  
  234.     void RemoveEmbeddedFrame(in ODFrame embeddedFrame);
  235.  
  236.     ODShape RequestFrameShape(in ODFrame embeddedFrame,
  237.                               in ODShape frameShape);
  238.  
  239.     void UsedShapeChanged(in ODFrame embeddedFrame);
  240.  
  241.     ODShape AdjustBorderShape(in ODFacet embeddedFacet,
  242.                               in ODShape shape);
  243.  
  244.     ODStorageUnit AcquireContainingPartProperties(in ODFrame frame);
  245.  
  246.     ODBoolean RevealFrame(in ODFrame embeddedFrame,
  247.                           in ODShape revealShape);
  248.     
  249.     void EmbeddedFrameSpec(in ODFrame embeddedFrame,
  250.                            in ODObjectSpec spec);
  251.     
  252.     ODEmbeddedFramesIterator CreateEmbeddedFramesIterator(in ODFrame frame);
  253.  
  254.     //==========================================================================
  255.     // DO NOT OVERRIDE
  256.     //==========================================================================
  257.  
  258.     //--------------------------------------------------------------------------
  259.     // From Part Wrapping protocol
  260.     //--------------------------------------------------------------------------
  261.  
  262.     ODBoolean IsRealPart();
  263.    
  264.     ODPart GetRealPart();
  265.    
  266.     void ReleaseRealPart();
  267.  
  268.     //==========================================================================
  269.  
  270.     #ifdef __SOMIDL__
  271.     implementation
  272.     {
  273.         majorversion = 1; minorversion = 0;
  274.         
  275.         functionprefix = ODPart;
  276.         
  277.         override:
  278.             somUninit,
  279.             CloneInto,
  280.             Externalize;
  281.  
  282.         releaseorder:
  283.             InitPart,
  284.             InitPartFromStorage,
  285.             DisplayFrameAdded,
  286.             DisplayFrameRemoved,
  287.             DisplayFrameConnected,
  288.             DisplayFrameClosed,
  289.             AttachSourceFrame,
  290.             FrameShapeChanged,
  291.             ViewTypeChanged,
  292.             PresentationChanged,
  293.             SequenceChanged,
  294.             LinkStatusChanged,
  295.             ContainingPartPropertiesUpdated,
  296.             ReadPartInfo,
  297.             WritePartInfo,
  298.             ClonePartInfo,
  299.             Open,
  300.             Draw,
  301.             FacetAdded,
  302.             FacetRemoved,
  303.             GeometryChanged,
  304.             HighlightChanged,
  305.             CanvasChanged,
  306.             CanvasUpdated,
  307.             GetPrintResolution,
  308.             BeginRelinquishFocus,
  309.             CommitRelinquishFocus,
  310.             AbortRelinquishFocus,
  311.             FocusAcquired,
  312.             FocusLost,
  313.             ExternalizeKinds,
  314.             ChangeKind,
  315.             HandleEvent,
  316.             AdjustMenus,
  317.  
  318.             UndoAction,
  319.             RedoAction,
  320.             DisposeActionState,
  321.             WriteActionState,
  322.             ReadActionState,
  323.             FulfillPromise,
  324.             DropCompleted,
  325.             DragEnter,
  326.             DragWithin,
  327.             DragLeave,
  328.             Drop,
  329.             CreateLink,
  330.             RevealLink,
  331.             LinkUpdated,
  332.             EmbeddedFrameUpdated,
  333.             EditInLinkAttempted,
  334.             RequestEmbeddedFrame,
  335.             RemoveEmbeddedFrame,
  336.             RequestFrameShape,
  337.             UsedShapeChanged,
  338.             AdjustBorderShape,
  339.             AcquireContainingPartProperties,
  340.             RevealFrame,
  341.             EmbeddedFrameSpec,
  342.             CreateEmbeddedFramesIterator,
  343.  
  344.             IsRealPart,
  345.             GetRealPart,
  346.             ReleaseRealPart;
  347.     };
  348.     #endif
  349. };
  350.  
  351. #endif // _PART_
  352.